package com.tong.example.gateway.controller;

import com.tong.example.gateway.feign.ServerHello;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@AllArgsConstructor
@RestController
@RequestMapping("hello")
public class HelloController {
//    private final ServerRoute serverRoute;
    private final ServerHello serverHello;

    @GetMapping("say")
    public String say(@RequestParam("name") String name) {
        return this.serverHello.say(name);
    }

//    @GetMapping("routefilters")
//    public String routefilters() {
//        return gatewayFeign.routefilters();
//    }

}
